
<!DOCTYPE html>
<html lang="" class="loading">
<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>汇编语言程序设计 - L3SLIE</title>
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <meta name="google" content="notranslate" />
    <meta name="keywords" content="L3SLIE,"> 
    <meta name="description" content="Welcome &amp; suit yourself,info在B站上看的小甲鱼，开学也要学汇编了，做个笔记。

汇编环境：DOSbox 0.74
编辑器：MASMPlus

基础知识小结：

汇编指令是机器指令的助记符，同机器指令一一对应。

每一种,"> 
    <meta name="author" content="L3SLIE"> 
    <link rel="alternative" href="atom.xml" title="L3SLIE" type="application/atom+xml"> 
    <link rel="icon" href="/img/favicon.png"> 
    <link href="https://fonts.loli.net/css?family=Roboto+Mono|Rubik&display=swap" rel="stylesheet">
    
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">

    
<link rel="stylesheet" href="//cdn.bootcss.com/animate.css/3.7.2/animate.min.css">

    
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/social-share.js/1.0.16/css/share.min.css">

    
<link rel="stylesheet" href="//cdn.bootcss.com/codemirror/5.48.4/codemirror.min.css">

    
<link rel="stylesheet" href="//cdn.bootcss.com/codemirror/5.48.4/theme/dracula.css">

    
<link rel="stylesheet" href="/css/obsidian.css">

    
<link rel="stylesheet" href="/css/ball-atom.min.css">

<meta name="generator" content="Hexo 4.2.0"></head>


<body class="loading">
    <div class="loader">
        <div class="la-ball-atom la-2x">
            <div></div>
            <div></div>
            <div></div>
            <div></div>
        </div>
    </div>
    <span id="config-title" style="display:none">L3SLIE</span>
    <div id="loader"></div>
    <div id="single">
    <div class="scrollbar gradient-bg-rev"></div>
<div id="top" style="display: block;">
    <div class="bar" style="width: 0;"></div>
    <div class="navigation animated fadeIn fast delay-1s">
        <img id="home-icon" class="icon-home" src="/img/favicon.png" alt="" data-url="http://l3slie.gitee.io">
        <div id="play-icon" title="Play/Pause" class="iconfont icon-play"></div>
        <h3 class="subtitle">汇编语言程序设计</h3>
        <div class="social">
            <!--        <div class="like-icon">-->
            <!--            <a href="javascript:;" class="likeThis active"><span class="icon-like"></span><span class="count">76</span></a>-->
            <!--        </div>-->
            <div>
                <div class="share">
                    
                        <a href="javascript:;" class="iconfont icon-share1"></a>
                        <div class="share-component-cc" data-disabled="facebook,douban,linkedin,diandian,tencent,google"></div>
                    
                </div>
            </div>
        </div>
    </div>
</div>

    <div class="section">
        <div class=article-header-wrapper>
    <div class="article-header">
        <div class="article-cover animated fadeIn" style="
            animation-delay: 600ms;
            animation-duration: 1.2s;
            background-image: 
                radial-gradient(ellipse closest-side, rgba(0, 0, 0, 0.65), #100e17),
                url(/img/cover1.jpg) ">
        </div>
        <div class="else">
            <p class="animated fadeInDown">
                
                <a href="/categories/汇编"><b>「
                    </b>汇编<b> 」</b></a>
                
                February 14, 2020
            </p>
            <h3 class="post-title animated fadeInDown"><a href="/2020/02/14/%E6%B1%87%E7%BC%96%E8%AF%AD%E8%A8%80%E7%A8%8B%E5%BA%8F%E8%AE%BE%E8%AE%A1/" title="汇编语言程序设计" class="">汇编语言程序设计</a>
            </h3>
            
            <p class="post-count animated fadeInDown">
                
                <span>
                    <b class="iconfont icon-text2"></b> <i>Words count</i>
                    5.2k
                </span>
                
                
                <span>
                    <b class="iconfont icon-timer__s"></b> <i>Reading time</i>
                    5 mins.
                </span>
                
                
                <span id="/2020/02/14/汇编语言程序设计/" class="leancloud_visitors" data-flag-title="汇编语言程序设计">
                    <b class="iconfont icon-read"></b> <i>Read count</i>
                    <span class="leancloud-visitors-count">100000</span>
                </span>
                
                
            </p>
            
            
            <ul class="animated fadeInDown post-tags-list" itemprop="keywords"><li class="animated fadeInDown post-tags-list-item"><a class="animated fadeInDown post-tags-list-link" href="/tags/NOTE/" rel="tag">NOTE</a></li><li class="animated fadeInDown post-tags-list-item"><a class="animated fadeInDown post-tags-list-link" href="/tags/%E6%B1%87%E7%BC%96%E8%AF%AD%E8%A8%80%E7%BC%96%E7%A8%8B/" rel="tag">汇编语言编程</a></li></ul>
            
        </div>
    </div>
</div>

<div class="screen-gradient-after">
    <div class="screen-gradient-content">
        <div class="screen-gradient-content-inside">
            <div class="bold-underline-links screen-gradient-sponsor">
                <p>
                    <span class="animated fadeIn delay-1s"></span>
                </p>
            </div>
        </div>
    </div>
</div>

<div class="article">
    <div class='main'>
        <div class="content markdown animated fadeIn">
            <h1 id="info"><a href="#info" class="headerlink" title="info"></a>info</h1><p>在B站上看的小甲鱼，开学也要学汇编了，做个笔记。</p>
<ul>
<li>汇编环境：DOSbox 0.74</li>
<li>编辑器：MASMPlus</li>
</ul>
<p>基础知识小结：</p>
<ol>
<li><p>汇编指令是机器指令的助记符，同机器指令一一对应。</p>
</li>
<li><p>每一种CPU都有自己的汇编指令集。</p>
</li>
<li><p>CPU可以直接使用的信息在存储器中存放。</p>
</li>
<li><p>在存储器中指令和数据没有任何区别，都是二进制信息。</p>
</li>
<li><p>存储单元从0开始顺序编号。</p>
</li>
<li><p>一个存储单元可以存储<code>8 bit</code>，即8位二进制数。</p>
</li>
<li><p><code>1 B =  8 b</code>      <code>1 KB = 1024 B</code>    <code>1 MB = 1024 KB</code> …</p>
</li>
<li><p>每一个CPU芯片都有许多管脚，这些管脚和总线相连。也可以说，这些管脚引出三种总线的宽度标志了这个CPU的不同方面性能：</p>
<p>1）地址总线的宽度决定了CPU的寻址能力；</p>
<p>2）数据总线的宽度决定了CPU与其他器件进行数据传输时的一次数据传送量；</p>
<p>3）控制总线宽度决定了CPU对系统中其他器件的控制能力。</p>
</li>
</ol>
<hr>
<p>笔记都会分成一类，以便到时候续写和查找。</p>
<hr>
<h1 id="安装DosBox-MASMPlus-踩坑"><a href="#安装DosBox-MASMPlus-踩坑" class="headerlink" title="安装DosBox + MASMPlus 踩坑"></a>安装DosBox + MASMPlus 踩坑</h1><p>放个资源吧，<a href="https://pan.baidu.com/s/1NE2B_GGnyo2SlaY_72f8iw" target="_blank" rel="noopener">DosBox + MASMPlus</a> 提取码: wtsg </p>
<h2 id="官网上下载的MASMPlus，找不到LINK-exe，debug-exe，MASM-exe，edit-exe等所需文件。"><a href="#官网上下载的MASMPlus，找不到LINK-exe，debug-exe，MASM-exe，edit-exe等所需文件。" class="headerlink" title="官网上下载的MASMPlus，找不到LINK.exe，debug.exe，MASM.exe，edit.exe等所需文件。"></a>官网上下载的MASMPlus，找不到<code>LINK.exe</code>，<code>debug.exe</code>，<code>MASM.exe</code>，<code>edit.exe</code>等所需文件。</h2><p>但是不接入Dosbox是可以编译的，显然是有这些文件的，但是文件太多，👴找不到。</p>
<p>上面给出的链接里有所需的文件。</p>
<h2 id="分区"><a href="#分区" class="headerlink" title="分区"></a>分区</h2><p><em>不要把dosbox下到C盘！！！</em></p>
<p><em>不要把dosbox下到C盘！！！</em></p>
<p><em>不要把dosbox下到C盘！！！</em></p>
<p>下到C盘dosbox就不会用了，刺激吧。</p>
<p>如果你的电脑有多个分区，<del>我之前只有一个</del>，就不用再分区，如果你不会分区，百度上有<a href="https://jingyan.baidu.com/article/fcb5aff762caf4edaa4a71e6.html" target="_blank" rel="noopener">分区教学</a>。</p>
<h2 id="文件配置"><a href="#文件配置" class="headerlink" title="文件配置"></a>文件配置</h2><p>给出了这么些个文件，要和你需要编辑，编译，链接，运行的文件放在一起。DosBox调用程序貌似不能跨文件夹，隔一层就不行。如图：</p>
<p><img src="https://gitee.com/L3SLIE/blog/raw/master/img/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6.jpg" alt="配置文件"></p>
<p>我是这么放的，也就是你的<code>.asm</code>程序所在位置必须有上面四个程序捆绑，否则是无法编译的，会有Illegal order之类的提示。</p>
<ol>
<li>打开MASMPlus</li>
<li>打开工具栏中的<code>配置</code></li>
<li>点<code>编译/脚本</code>，选中单独文件默认使用DOS模式（第二连接器）选项</li>
<li>然后点旁边的<code>工具</code>如下图：</li>
<li><img src="https://gitee.com/L3SLIE/blog/raw/master/img/DosBox%E7%B3%BB%E7%BB%9F%E9%85%8D%E7%BD%AE.jpg" alt="MASMplus系统配置"></li>
</ol>
<pre><code class="text">菜单文本：随便怎么填，我填的是：Dosbox。

工具路径：填写你的DosBox的安装路径，根据自己实际情况填写即可。

工具图标：不用填

运行参数：$(FileDir)\$(FileName).asm
#单个文件时，自动执行mount命令并识别文件，如果没有所标的后缀的文件，不会触发。
#这是将dosbox作为MASMplus的插件</code></pre>
<ol start="6">
<li><p>打开dosbox配置文件<code>DOSBox 0.74 Options.bat</code>，记事本打开。</p>
<pre><code class="yaml">mount c E:\dos\asm
C:</code></pre>
<p>这是DosBox启动时执行的内容，你需要将<code>E:\dos\asm</code>替换为你asm文件的地址。不加的话打开之后需要手动输这个命令，如果你的文件都是在一个文件夹里，可以加上，毕竟每次打开都要<code>挂载</code>麻烦死了。</p>
</li>
<li><p>配置完成。</p>
</li>
</ol>
<h2 id="测试代码"><a href="#测试代码" class="headerlink" title="测试代码"></a>测试代码</h2><pre><code class="txt">assume cs:codesg

  codesg segment

      mov ax,0123h
      mov bx,0456h
      add ax,bx
      add ax,ax
      mov ax,4c00h
      int 21h

  codesg ends

end</code></pre>
<p>MASMplus打开新建文件，复制到里面，保存为<code>.asm</code>格式，打开dosbox，执行代码。</p>
<pre><code class="txt">MASM TEST.ASM     #生成.obj文件
LINK TEST.obj     #链接.obj生成.exe文件
debug test.exe    #对生成可执行文件进行调试</code></pre>
<p>如果可以正常运行，配置就完成啦。下面是我的运行图：</p>
<p><img src="https://gitee.com/L3SLIE/blog/raw/master/img/DEBUG.jpg" alt="DEBUG"></p>
<h2 id="DosBox常用命令"><a href="#DosBox常用命令" class="headerlink" title="DosBox常用命令"></a>DosBox常用命令</h2><pre><code class="txt">DOSBox 常用命令 debug模式下：

-g 执行完exe运行结果显示
-a 编写汇编命令
-t 单步执行
-p 直接执行完不是单步执行
-u 反编译
-r 查看修改寄存器的值
-d 查看内存单元
-e 修改内存单元
-? 查看指令帮助
-q 退出debug</code></pre>
<h1 id="HelloWorld"><a href="#HelloWorld" class="headerlink" title="HelloWorld"></a>HelloWorld</h1><pre><code class="txt">                         ASSUME CS:CODE,DS:DATA
                         DATA SEGMENT
                         DB &quot;HELLO WORLD&quot; ;存储要显示的数据
                         DATA ENDS

                         CODE SEGMENT
                         START:
                         MOV AX,0B800H ;显存的段地址
                         MOV ES,AX ;es做显存段地址
                         MOV AX,DATA ;把标记data的地址给ax
                         MOV DS,AX ;ds存储data的段地址
                         MOV BX,0 ;bx置零，用作数据段的寻址
                         MOV DI,0 ;di用于显存的寻址
                         MOV CX,11 ;循环11次，因为hello world有11个字符
                         ;以下为显示过程
                         S:
                         MOV AL,[BX] ;把bx指向的内存单元中的数据给al
                         MOV AH,2 ;设置绿色字体
                         MOV ES:[DI],AX ;送入显存
                         INC BX ;bx+1
                         ADD DI,2 ;di+2
                         LOOP S ;循环执行S

                         MOV AH,1
                         INT 21H ;调用中断暂停，等待键盘输入一个字节
                         MOV AX,4C00H
                         INT 21H ;调用中断退出程序
                         CODE ENDS
                         END START</code></pre>
<p>注释符号为<code>;</code>，输出的HELLO WORLD在界面最上方。</p>

            <!--[if lt IE 9]><script>document.createElement('audio');</script><![endif]-->
            <audio id="audio" loop="1" preload="auto" controls="controls"
                data-autoplay="false">
                <source type="audio/mpeg" src="">
            </audio>
            
            <ul id="audio-list" style="display:none">
                
                
                <li title='0' data-url='/statics/i saw you in a dream.mp3'></li>
                
                    
            </ul>
            
            
            
            <div id="vcomments"></div>
            
        </div>
        <div class="sidebar">
            <div class="box animated fadeInRight">
                <div class="subbox">
                    <img src="/img/avatar.jpg" height=300 width=300></img>
                    <p>L3SLIE</p>
                    <span>Life Long & Pwn</span>
                    <dl>
                        <dd><a href="https://github.com/13slie" target="_blank"><span
                                    class=" iconfont icon-github"></span></a></dd>
                        <dd><a href="" target="_blank"><span
                                    class=" iconfont icon-twitter"></span></a></dd>
                        <dd><a href="https://stackexchange.com/users/17805607/l3slie" target="_blank"><span
                                    class=" iconfont icon-stack-overflow"></span></a></dd>
                    </dl>
                </div>
                <ul>
                    <li><a href="/">46 <p>Articles</p></a></li>
                    <li><a href="/categories">13 <p>Categories</p></a></li>
                    <li><a href="/tags">20 <p>Tags</p></a></li>
                    <br><span><b><p>友链博客</p></b></span><br>
                    <span><u><p><a href="http://rdd.xjusec.club/" target="_blank">Rdd</a></p></u></span>
                    <span><u><p><a href="http://www.xjusec.club/" target="_blank">XJUSEC</a></p></u></span>
                    <span><u><p><a href="http://www.r1ght0us.xyz/" target="_blank">r1ght0us</a></p></u></span>
                </ul>
            </div>
            
            
            
            <div class="box sticky animated fadeInRight faster">
                <div id="toc" class="subbox">
                    <h4>Contents</h4>
                    <ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#info"><span class="toc-number">1.</span> <span class="toc-text">info</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#安装DosBox-MASMPlus-踩坑"><span class="toc-number">2.</span> <span class="toc-text">安装DosBox + MASMPlus 踩坑</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#官网上下载的MASMPlus，找不到LINK-exe，debug-exe，MASM-exe，edit-exe等所需文件。"><span class="toc-number">2.1.</span> <span class="toc-text">官网上下载的MASMPlus，找不到LINK.exe，debug.exe，MASM.exe，edit.exe等所需文件。</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#分区"><span class="toc-number">2.2.</span> <span class="toc-text">分区</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#文件配置"><span class="toc-number">2.3.</span> <span class="toc-text">文件配置</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#测试代码"><span class="toc-number">2.4.</span> <span class="toc-text">测试代码</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#DosBox常用命令"><span class="toc-number">2.5.</span> <span class="toc-text">DosBox常用命令</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#HelloWorld"><span class="toc-number">3.</span> <span class="toc-text">HelloWorld</span></a></li></ol>
                </div>
            </div>
            
            
        </div>
    </div>
</div>

    </div>
</div>
    <div id="back-to-top" class="animated fadeIn faster">
        <div class="flow"></div>
        <span class="percentage animated fadeIn faster">0%</span>
        <span class="iconfont icon-top02 animated fadeIn faster"></span>
    </div>
</body>
<footer>
    <p class="copyright" id="copyright">
		<span id="timeDate">载入天数...</span><span id="times">载入时分秒...</span>
		<script>
		var now = new Date(); 
		function createtime() { 
			var grt= new Date("01/10/2020 00:00:00");//在此处修改你的建站时间
			now.setTime(now.getTime()+250); 
			days = (now - grt ) / 1000 / 60 / 60 / 24; dnum = Math.floor(days); 
			hours = (now - grt ) / 1000 / 60 / 60 - (24 * dnum); hnum = Math.floor(hours); 
			if(String(hnum).length ==1 ){hnum = "0" + hnum;} minutes = (now - grt ) / 1000 /60 - (24 * 60 * dnum) - (60 * hnum); 
			mnum = Math.floor(minutes); if(String(mnum).length ==1 ){mnum = "0" + mnum;} 
			seconds = (now - grt ) / 1000 - (24 * 60 * 60 * dnum) - (60 * 60 * hnum) - (60 * mnum); 
			snum = Math.round(seconds); if(String(snum).length ==1 ){snum = "0" + snum;} 
			document.getElementById("timeDate").innerHTML = "本站已安全运行 "+dnum+" 天 "; 
			document.getElementById("times").innerHTML = hnum + " 小时 " + mnum + " 分 " + snum + " 秒"; 
		} 
		setInterval("createtime()",250);
		</script>
        &copy; 2020
        <span class="gradient-text">
            L3SLIE
        </span>❤
        Powered by <a href="http://hexo.io/" title="Hexo" target="_blank" rel="noopener">Hexo</a>
        Theme
        <span class="gradient-text">
            <a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
        </span>
        <small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.3" target="_blank" rel="noopener">v1.4.3</a></small>
    </p>
</footer>

<script type="text/javascript" src="https://cdn.bootcss.com/mathjax/2.7.6/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<script>
  MathJax.Hub.Config({
    "HTML-CSS": {
      preferredFont: "TeX",
      availableFonts: ["STIX", "TeX"],
      linebreaks: {
        automatic: true
      },
      EqnChunk: (MathJax.Hub.Browser.isMobile ? 10 : 50)
    },
    tex2jax: {
      inlineMath: [
        ["$", "$"],
        ["\\(", "\\)"]
      ],
      processEscapes: true,
      ignoreClass: "tex2jax_ignore|dno",
      skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
    },
    TeX: {
      noUndefined: {
        attributes: {
          mathcolor: "red",
          mathbackground: "#FFEEEE",
          mathsize: "90%"
        }
      },
      Macros: {
        href: "{}"
      }
    },
    messageStyle: "none"
  });
</script>
<script>
  function initialMathJax() {
    MathJax.Hub.Queue(function () {
      var all = MathJax.Hub.getAllJax(),
        i;
      // console.log(all);
      for (i = 0; i < all.length; i += 1) {
        console.log(all[i].SourceElement().parentNode)
        all[i].SourceElement().parentNode.className += ' has-jax';
      }
    });
  }

  function reprocessMathJax() {
    if (typeof MathJax !== 'undefined') {
      MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
    }
  }
</script>




<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="/js/plugin.js"></script>
<script src="/js/obsidian.js"></script>
<script src="/js/jquery.truncate.js"></script>
<script src="/js/search.js"></script>


<script src="//cdn.bootcss.com/typed.js/2.0.10/typed.min.js"></script>


<script src="//cdn.bootcss.com/blueimp-md5/2.12.0/js/md5.min.js"></script>


<script src="//cdnjs.cloudflare.com/ajax/libs/social-share.js/1.0.16/js/social-share.min.js"></script>


<script src="https://cdn.bootcss.com/codemirror/5.48.4/codemirror.min.js"></script>

    
<script src="//cdn.bootcss.com/codemirror/5.48.4/mode/javascript/javascript.min.js"></script>


    
<script src="//cdn.bootcss.com/codemirror/5.48.4/mode/css/css.min.js"></script>


    
<script src="//cdn.bootcss.com/codemirror/5.48.4/mode/xml/xml.min.js"></script>


    
<script src="//cdn.bootcss.com/codemirror/5.48.4/mode/htmlmixed/htmlmixed.min.js"></script>


    
<script src="//cdn.bootcss.com/codemirror/5.48.4/mode/clike/clike.min.js"></script>


    
<script src="//cdn.bootcss.com/codemirror/5.48.4/mode/php/php.min.js"></script>


    
<script src="//cdn.bootcss.com/codemirror/5.48.4/mode/shell/shell.min.js"></script>


    
<script src="//cdn.bootcss.com/codemirror/5.48.4/mode/python/python.min.js"></script>




    
<script src="/js/busuanzi.min.js"></script>

    <script>
        $(document).ready(function () {
            if ($('span[id^="busuanzi_"]').length) {
                initialBusuanzi();
            }
        });
    </script>



<link rel="stylesheet" href="//cdn.bootcss.com/photoswipe/4.1.3/photoswipe.min.css">
<link rel="stylesheet" href="//cdn.bootcss.com/photoswipe/4.1.3/default-skin/default-skin.min.css">


<script src="//cdn.bootcss.com/photoswipe/4.1.3/photoswipe.min.js"></script>
<script src="//cdn.bootcss.com/photoswipe/4.1.3/photoswipe-ui-default.min.js"></script>


<!-- Root element of PhotoSwipe. Must have class pswp. -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
    <!-- Background of PhotoSwipe. 
         It's a separate element as animating opacity is faster than rgba(). -->
    <div class="pswp__bg"></div>
    <!-- Slides wrapper with overflow:hidden. -->
    <div class="pswp__scroll-wrap">
        <!-- Container that holds slides. 
            PhotoSwipe keeps only 3 of them in the DOM to save memory.
            Don't modify these 3 pswp__item elements, data is added later on. -->
        <div class="pswp__container">
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
        </div>
        <!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
        <div class="pswp__ui pswp__ui--hidden">
            <div class="pswp__top-bar">
                <!--  Controls are self-explanatory. Order can be changed. -->
                <div class="pswp__counter"></div>
                <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
                <button class="pswp__button pswp__button--share" title="Share"></button>
                <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
                <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
                <!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
                <!-- element will get class pswp__preloader--active when preloader is running -->
                <div class="pswp__preloader">
                    <div class="pswp__preloader__icn">
                      <div class="pswp__preloader__cut">
                        <div class="pswp__preloader__donut"></div>
                      </div>
                    </div>
                </div>
            </div>
            <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
                <div class="pswp__share-tooltip"></div> 
            </div>
            <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
            </button>
            <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
            </button>
            <div class="pswp__caption">
                <div class="pswp__caption__center"></div>
            </div>
        </div>
    </div>
</div>







<script>
    function initialTyped () {
        var typedTextEl = $('.typed-text');
        if (typedTextEl && typedTextEl.length > 0) {
            var typed = new Typed('.typed-text', {
                strings: ["Life Long &amp; Pwn", "生命不息，破解不止"],
                typeSpeed: 90,
                loop: true,
                loopCount: Infinity,
                backSpeed: 20,
            });
        }
    }

    if ($('.article-header') && $('.article-header').length) {
        $(document).ready(function () {
            initialTyped();
        });
    }
</script>


    
<script src="//unpkg.com/valine/dist/Valine.min.js"></script>

    <script>

        var valine = new Valine();

        function initValine(path) {
            if (!path) path = window.location.pathname;
            let language = '';
            if (!language) {
                language = 'en';
            } else {
                language = language.toLowerCase();
            }
            valine.init({
                el: '#vcomments',
                appId: 'GnPlbHQ9xAWEoCDC8rR3zALj-gzGzoHsz',
                appKey: 'Nygd2awSxr9ioTDtvbH6hE0l',
                notify: 'false',
                verify: 'false',
                avatar: 'mm',
                placeholder: 'feel free to comment~',
                visitor: 'true',
                path: path,
                lang: language
            });
        }

        $(document).ready(function () {
            initValine();
        });
    </script>



</html>
<!-- 页面点击小红心 -->
<script type="text/javascript" src="/js/love.js"></script>
<!-- 烟火效果 -->
<canvas class="fireworks" style="position: fixed;left: 0;top: 0;z-index: 1; pointer-events: none;" ></canvas> 
<script type="text/javascript" src="//cdn.bootcss.com/animejs/2.2.0/anime.min.js"></script> 
<script type="text/javascript" src="/js/fireworks.js"></script>
<!--自定义标题-->
<script type="text/javascript" src="\js\title.js"></script>
